package com.youlu.campus.service.activity;

import com.youlu.campus.entity.UserActivityTaskInfo;
import com.youlu.campus.entity.UserPO;
import com.youlu.campus.entity.VO.req.ActivityTaskCaDomain;
import com.youlu.campus.entity.VO.req.UserActivityTaskInfoQueryListVO;
import com.youlu.campus.entity.VO.req.UserActivityTaskInfoQueryVO;
import com.youlu.campus.entity.VO.req.UserActivityTaskInfoVerifyReq;
import com.youlu.campus.entity.domain.SubsriptionWechatMsg;
import com.youlu.campus.entity.domain.UserActivityTaskInfoDomin;
import com.youlu.campus.entity.english.vo.request.QueryQaHomeCommand;
import com.youlu.campus.entity.enums.TaskBizType;
import org.springframework.data.domain.Page;

import java.util.Date;
import java.util.List;

public interface UserActivityTaskInfoService {

    Page<UserActivityTaskInfo> list(UserActivityTaskInfoQueryListVO req);

    boolean create(UserActivityTaskInfo req);

    boolean update(UserActivityTaskInfo req);

    boolean delete(String id);

    UserActivityTaskInfo find(String userId, String activityId, TaskBizType taskBizType, Date day);

    UserActivityTaskInfo find(String userId, String activityId, String taskId, Date day);

    UserActivityTaskInfo findTaskByStatus(String userId, String activityId, String taskId, Integer status);

    UserActivityTaskInfo findNotReceiveTask(String userId, String activityId, String taskId, List<Integer> status);

    UserActivityTaskInfo find(String userId, String activityId, String taskId);

    UserActivityTaskInfo find(String id);

    List<UserActivityTaskInfoDomin> findBy(UserActivityTaskInfoQueryVO req);

    /**
     * 创建用户每日打开任务
     *
     * @param taskInfo
     */
    void createTask(UserActivityTaskInfo taskInfo);

    /**
     * 创建用户任务
     *
     * @param taskInfo
     */
    UserActivityTaskInfo createTaskById(UserActivityTaskInfo taskInfo);

    UserActivityTaskInfo find(String userId, String activityId, TaskBizType taskBizType);

    /**
     * 用户加入任务
     *
     * @param activityId
     * @param taskBizType
     * @return
     */
    boolean join(UserPO userPO, String activityId, TaskBizType taskBizType);

    /**
     * 订阅通知
     *
     * @param req
     * @return
     */
    boolean subsriptionWechatMsg(SubsriptionWechatMsg req);

    /**
     * 平台订阅通知
     *
     * @param req
     * @return
     */
    boolean subsriptionAppWechatMsg(SubsriptionWechatMsg req);

    /**
     * 平台订阅通知
     *
     * @param req
     * @return
     */
    boolean subWechatMsg(SubsriptionWechatMsg req);

    /**
     * 获取活动任务证书信息
     *
     * @param req
     * @return
     */
    ActivityTaskCaDomain getActivityTaskCaInfo(QueryQaHomeCommand req);

    /**
     * 提交感悟
     *
     * @param activityId
     * @param userPO
     * @param taskBizType
     * @return
     */
    UserActivityTaskInfo submitGanWu(String activityId, UserPO userPO, TaskBizType taskBizType);

    /**
     * 获取用户活动任务信息
     *
     * @param activityId
     * @param userPO
     * @param taskBizType
     * @return
     */
    UserActivityTaskInfo findUserActivityTaskInfo(String activityId, UserPO userPO, TaskBizType taskBizType);


    UserActivityTaskInfo findOne(String id);

    /**
     * 审核任务
     * @param req
     * @return
     */
    boolean verifyTask(UserActivityTaskInfoVerifyReq req);
}
